<?php
// 固定卡密验证（a987654612）
$cardCode = $_GET['card_code'] ?? '';
if ($cardCode !== 'a987654612') {
    echo json_encode(['success' => false, 'error' => '卡密无效']);
    exit;
}

// 提取参数
$accessToken = $_GET['access_token'] ?? '';
$openid = $_GET['openid'] ?? '';
if (empty($accessToken) || empty($openid)) {
    echo json_encode(['success' => false, 'error' => '缺少token或openid']);
    exit;
}

// 仅返回和平精英模拟数据（实际可对接真实接口）
$peaceEliteData = [
    'name' => '和平精英',
    'gameId' => '1001',
    'banned' => false,
    'playDuration' => 156,
    'payAmount' => 298,
    'lastPlayTime' => '2025-10-05 14:30'
];
echo json_encode([
    'success' => true,
    'games' => [$peaceEliteData]
]);
?>
